package com.gopay.common.security.apicert.dao.impl;

import com.gopay.common.base.dao.BaseReadDAO;
import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.constants.cust.CustCaCertConstants;
import com.gopay.common.domain.cert.MsgGopaySignCert;
import com.gopay.common.domain.cust.CustCaCert;
import com.gopay.common.security.apicert.dao.MsgGopaySignCertQueryDAO;
import com.gopay.common.security.cacert.dao.impl.CustCaCertQueryDaoImpl;
import com.gopay.common.util.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @MsgGopaySignCertDAO
 * @AUTHOR LIUYONG
 * @2016/9/5 19:28 www.gopay.com.cn Inc.All rights reserved.
 */
@Repository("msgGopaySignCertQueryDAO")
public class MsgGopaySignCertQueryDAOImpl extends BaseDAOImpl<MsgGopaySignCert, Serializable> implements MsgGopaySignCertQueryDAO{

    private Logger logger = LoggerFactory.getLogger(MsgGopaySignCertQueryDAOImpl.class);


    @Override
    public List<MsgGopaySignCert> queryMsgGopaySignCertList(){
        String hql = "from MsgGopaySignCert ";
        Map<String, Object> param = new HashMap<String, Object>();

        logger.info("查询语句为："+hql);
        List<MsgGopaySignCert> list = findByHql(hql, param);
        return list;
    }

    @Override
    public List<MsgGopaySignCert> queryMsgGopaySignCertByStatus(String stat) {

        String hql = "from MsgGopaySignCert where stat=:stat";
        Map<String, Object> param = new HashMap<String, Object>();
        param.put("stat",stat);
        logger.info("查询语句为："+hql);
        List<MsgGopaySignCert> list = findByHql(hql, param);
        return list;
    }
}
